<?xml version="1.0" encoding="utf-8" ?>
<xs:schema id="Commands"
                  targetNamespace="http://VoiceCommander.Configuration/Commands.xsd"
                  elementFormDefault="qualified"
                  xmlns="http://VoiceCommander.Configuration/Commands.xsd"
                  xmlns:mstns="http://VoiceCommander.Configuration/Commands.xsd"
                  xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<xs:element name="Commands" type="CommandListType"/>

	<xs:complexType name="CommandListType">
		<xs:sequence minOccurs="1" maxOccurs="unbounded">
			<xs:element name="Command" type="CommandType"/>
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="CommandType">
		<xs:sequence minOccurs="1" maxOccurs="1">
			<xs:element name="Key" type="KeyType" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="InnerCommands" type="CommandListType" nillable="true" minOccurs="0" maxOccurs="1" />
		</xs:sequence>
		<xs:attribute name="text" type="xs:string" use="required" />
	</xs:complexType>

	<xs:complexType name="KeyType">
		<xs:attribute name="code" type="xs:int" use="optional" />
		<xs:attribute name="char" type="xs:string" use="optional" />
		<xs:attribute name="special" type="SpecialType" use="optional" default="None"/>
		<xs:attribute name="action" type="ActionType" use="optional" default="Press" />
	</xs:complexType>
	
	<xs:simpleType name="ActionType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="Press" />
			<xs:enumeration value="Hold" />
			<xs:enumeration value="Release" />
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="SpecialType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="None" />
			<xs:enumeration value="Enter" />
			<xs:enumeration value="Control" />
			<xs:enumeration value="Alt" />
			<xs:enumeration value="Shift" />
			<xs:enumeration value="Home" />
			<xs:enumeration value="End" />
			<xs:enumeration value="PageUp" />
			<xs:enumeration value="PageDown" />
			<xs:enumeration value="Delete" />
			<xs:enumeration value="Space" />
			<xs:enumeration value="F1" />
			<xs:enumeration value="F2" />
			<xs:enumeration value="F3" />
			<xs:enumeration value="F4" />
			<xs:enumeration value="F5" />
			<xs:enumeration value="F6" />
			<xs:enumeration value="F7" />
			<xs:enumeration value="F8" />
			<xs:enumeration value="F9" />
			<xs:enumeration value="F10" />
			<xs:enumeration value="F11" />
			<xs:enumeration value="F12" />
		</xs:restriction>
	</xs:simpleType>
</xs:schema>
